
export default {

  data() {
    return {};
  },
  watch: {
    showrightdetail() {
      this.compute_middle_component_style();
    }
  },
  methods: {
 


    compute_left_component_style(){},
    compute_table_item_show_dataSourceCode(item) {
      let arr = [];
      if (!item.relatedTour || item.relatedTour.length == 0) {
        arr.push(item.dataSourceCode);
      } else {
        item.relatedTour.map(x => {
          arr.push(x.dataSourceCode);
        });
      }
      item.show_dataSourceCode = arr;
      return arr.join(",");
    },




    table_item_click_expanded(item) {
      console.log(item);
      let arr=[]
      if(item.relatedTour ){
        arr  = item.relatedTour || [];
      }
      if(item.relatedMatch ){
        arr  = item.relatedMatch || [];
      }
     
      if (!item.show_expand) {
        arr.map(x => {
          x.is_child_showing = true;
        });
        this.tabledata.splice(this.tabledata.findIndex(x => x.id == item.id) + 1, 0, ...arr);
        item.show_expand = !item.show_expand;
      } else {
        arr.map(x => {
          x.is_child_showing = false;
        });
        this.tabledata.splice(this.tabledata.findIndex(x => x.id == item.id) + 1, arr.length);
        item.show_expand = !item.show_expand;

      }
      // this.table_item_click(item);
    },

  }
};
